// config.js
// 基础URL配置
const BASE_URLS = {
    apidemo6: 'https://apidemo6.ckbuyu.com/'
    // apidemo6: 'http://20.0.0.58:20003/'
};

// API端点配置
const API_ENDPOINTS = {
    querySession: 'onQuerySession',
    saveSession: 'onSaveSession',
    loadSession: 'onLoadSession',
    queryActive: 'onQueryActive',
    deleActive: 'onDeleActive',
    saveLog: 'onSaveLogImmedi',
    queryLog: 'queryLog',
    queryFeedBack: 'onQueryFeedBack',
    onGetUserEcpm: 'onGetUserEcpm',
    onResetPlayer: 'onResetPlayer',
    saveGameConfig: 'onSaveGameConfig'
};

// 生成路由配置的函数
function createRoutes(baseUrl) {
    const routes = {};
    routes.root = baseUrl;
    
    for (const [key, endpoint] of Object.entries(API_ENDPOINTS)) {
        routes[key] = baseUrl + endpoint;
    }
    
    return routes;
}

// 创建各平台的路由配置
const routes6 = createRoutes(BASE_URLS.apidemo6);

export { routes6 };